import Vue from 'vue';
import App from './../App';
import router from './../router';
import 'style/index.scss';
import i18n from 'common/lang'; //语言切换插件
import "../assets/icon/iconfont.css"
//table表格可复制插件
import VueClipboard from 'vue-clipboard2'
VueClipboard.config.autoSetContainer = true
Vue.use(VueClipboard)
//省市区三级联动插件
import Distpicker from 'v-distpicker'
Vue.use(Distpicker)
//图片放大插件
import preview from 'vue-photo-preview'
import 'vue-photo-preview/dist/skin.css'
Vue.use(preview)
//ElementUI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import {createdPropTip, buildExceptKeyAndValue, formatSystemDate} from 'js/utils'
import echarts from 'echarts'
Vue.prototype.echarts=echarts
Vue.prototype.buildExceptKeyAndValue = buildExceptKeyAndValue;
Vue.prototype.formatSystemDate = formatSystemDate;
window.createdPropTip = createdPropTip;

// import loading from 'plugs/loading';
import  calculate from 'js/calculate.js'
Vue.prototype.calculate = calculate;
import axios from 'js/axios';
import api from "js/service"
import store from 'store/store';
import Date from 'js/date';
import arrays from 'js/array';
import tps from 'js/tps.js'
Vue.prototype.tips = tps;
import currency from "js/currency.js"
import Print from 'vue-print-nb'
Vue.use(Print)
Vue.prototype.currency = currency;
// 对象的深拷贝方法： let newObject = _.cloneDeep(oldObject);
var _ = require('lodash');
// Load the core build.
var _ = require('lodash/core');

var fp = require('lodash/fp');


var array = require('lodash/array');
var object = require('lodash/fp/object');


var at = require('lodash/at');
var curryN = require('lodash/fp/curryN');


Vue.config.productionTip = false;
Vue.prototype.api = api;
import VueAwesomeSwiper from 'vue-awesome-swiper';

Vue.use(arrays);
//日期格式转换
Vue.use(Date);
//ElementUI
Vue.use(ElementUI);

Vue.use(VueAwesomeSwiper);

//注册全局axios插件
Vue.prototype.axios = axios;

//全局插件
// Vue.use(loading);
new Vue({
  render: h => h(App),
  store,
  router,
  i18n,
  data: {
    Hub: new Vue() //创建事件中心
  }
}).$mount('#app');
